package com.example.ticket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.ticket.entity.Ban;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BanMapper extends BaseMapper<Ban> {
    //填写冻结原因
    @Insert("insert into t_ban(user_id,remark) values (#{userId},#{remark})")
    public int insertBan(Ban ban);

    //用户列表
    @Select("select * from t_ban")
    public List<Ban> Banlist();

    //填写冻结原因
    @Insert("update t_ban set remark=#{remark} where id=#{id}")
    public int updateRemark(Integer id,String remark);
}
